﻿using System;
using System.Data.Entity;

using PortalIntranet.DatabaseComponents.Administracao;
using PortalIntranet.DatabaseComponents.Seguranca;
using PortalIntranet.DatabaseComponents.WebParts;
using PortalIntranet.DatabaseComponents.WebParts.LinksGerais;
using PortalIntranet.DatabaseComponents.WebParts.ConteudosHtml;
using PortalIntranet.DatabaseComponents.WebParts.ConteudosWeb;
using PortalIntranet.DatabaseComponents.WebParts.Galerias;
using PortalIntranet.DatabaseComponents.WebParts.Bibliotecas;

namespace PortalIntranet.DatabaseComponents
{
	public class IntranetContexto : DbContext
	{
		public IntranetContexto()
			: base("PortalIntranet")
		{
			Configuration.AutoDetectChangesEnabled = true;
			Configuration.LazyLoadingEnabled = true;
			Configuration.ValidateOnSaveEnabled = true;
			Database.SetInitializer<IntranetContexto>(null);
		}

		public DbSet<TipoLayout> TiposLayouts { get; set; }

		public DbSet<Estado> Estados { get; set; }
		public DbSet<Empresa> Empresas { get; set; }
		public DbSet<Grupo> Grupos { get; set; }

		public DbSet<Usuario> Usuarios { get; set; }		
		public DbSet<Departamento> Departamentos { get; set; }
		public DbSet<WebPage> WebPages { get; set; }
		public DbSet<Portlet> Portlets { get; set; }

		public DbSet<WebPart> WebParts { get; set; }
		public DbSet<LinkGeral> LinksGerais { get; set; }
		public DbSet<ConteudoHtml> ConteudosHtml { get; set; }
		public DbSet<ConteudoWeb> ConteudosWeb { get; set; }
		public DbSet<Galeria> Galerias { get; set; }
		public DbSet<GaleriaItem> GaleriasItens { get; set; }
		public DbSet<Biblioteca> Bibliotecas { get; set; }
		public DbSet<BibliotecaItem> BibliotecasItens { get; set; }
	}
}
